/*******************************************************************************
*  Project      : Minigate Golfin                                 
*  Program ID   : home.js                                 
*  Description  : 클럽개별메인 
*
********************************************************************************
*  Program History                                                            
*  Date        Author    Description                                          
*  ----------  --------  -------------------------------------------------------- 
*  2012-06-20  이윤노    Created.  
*  2012-06-00  이윤노    Complete.  
*******************************************************************************/

jQuery(function($){

	$.ajax({
		//url: _ROOT + "/self_club/js/self_club_top.js"
		url: "js/self_club_top.js"
		, type: "get"
		, dataType: "script"
		, async: false
		, success: function(){
			//alert("ok");
		}
		, error: function(){
			//alert("error");
		}
	});
	
	// 동호회 정보
	function clsClubInfo()
	{
		this._HTMLDom = null;
		this.infoData = null;
		
		this._init();
	}
	
	clsClubInfo.prototype = {
		_init: function(){
			var $layer = $("div#container ul.self_c_name li:eq(0)");
			
			this._HTMLDom = {
				"$layer": $layer
				, "$banner": $("div#container div.self_club_visual")
			}
			
		}
		, setData: function(thisData){
			this.infoData = thisData;
			this.display();
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"];
			var $banner = this._HTMLDom["$banner"];
			var thisClass = this;
			
			this.isRole();
			
		}
		// 가입하기 버튼
		, $getBtnJoin: function(){
			var $layer = this._HTMLDom["$layer"];			
			return $layer.find("span:eq(3) a");
		}
		, setClubInfoData: function(key, val){
			this.infoData[key] = val;	
		}
		, getClubInfoData: function(key){
			return this.infoData[key];	
		}
		, isRole: function(){
			if(this.infoData["가입여부"] != "0"){//0-일반회원, 1-가입대기회원, 9-탈퇴회원
				alert("동호회에 가입되지 않은 회원은 이용하실 수 없습니다.");
				document.location.href = "home.html?club_seq=" + this.infoData["동호회키"];
			}
		
			//개설자(매니저) 인경우만 배정목록표시
			if(this.infoData["내상태"] == "1"){
				$("p.rd_time_btn").show();
				$("p.btn_area_box:eq(0)").hide();				
			}else {
				$("p.rd_time_btn").hide();
				$("p.btn_area_box:eq(1)").hide();
			}
		}
		, isMember: function(){
			var msg = {
				"코드":	 (this.infoData["가입여부"]=="0"?true:false)
				, "메세지": "동호회에 가입되지 않은 회원은 이용하실 수 없습니다."
			}
			return msg;
		}
		, isSuperMng: function(){
			var msg = {
				"코드":	 (this.infoData["내상태"]=="1"?true:false)
				, "메세지": "동호회 매니저/개설자만 이용하실 수 있습니다."
			}
			return msg;
		}
		, isOpenView: function(viewType){
			var msg = {
				"코드":	 true
				, "메세지": "동호회 회원만 볼 수 있는 게시글입니다."
			}
			
			if(viewType == "C"){
				if(this.infoData["가입여부"]!="0"){
					msg["코드"]=false;
				}
			}
			return msg;
		}
	}
	
	//팀목록 셀렉트박스
	function clsTeamList(){
		this._HTMLDom = null;
		this.listData =null;
		
		this._init();	
	}
	
	clsTeamList.prototype = {
		_init: function(){
			var $layer = $("div.pw_area02 div.pop_round dl.th dd select");	
			this._HTMLDom = {
				"$layer": $layer
				, "$element": $layer.find("option:last")	
			}
			
			this._bind();
			
			$layer.empty();
		}	
		, setList: function(thisData){
			this.listData = thisData;
			this.display();	
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"];
			var $element = this._HTMLDom["$element"];
			var thisClass = this;
			
			$layer.empty();
			
			for(var i=0;i<this.listData.length;++i){
				$layer.append($element.clone(true));	
			}
			
			$layer.find("option").each(function(n){
				$(this).html(thisClass.listData[n]["팀명"]);
			});
		}
		, _bind: function(){
			var $layer = this._HTMLDom["$layer"];
			var thisClass = this;
			
			$layer.change(function(event){								
				$(thisClass).trigger("selectChange")
			});
		}
		, getValue: function(){
			var $layer = this._HTMLDom["$layer"];
			return this.listData[$layer.find("option").index($layer.find(":checked"))]["팀키"];
		}
		, setValue: function(val){
			var $layer = this._HTMLDom["$layer"].find("option").eq(val-1).attr("selected", "selected");
			
		}	
	}
	
	//배정신청자 목록
	function clsRequestUserList(){
		this._HTMLDom = null;
		this.listData = null;
		
		this._init();	
	}
	
	clsRequestUserList.prototype = {
		_init: function(){
			var $layer = $("div.pw_area02 div.round div.left:eq(0)");
			this._HTMLDom = {
				"$layer": $layer
				, "$element": $layer.find(">dl>dd>ul>li:first")
				, "$count": $layer.find("dt.group p.fl span")
			}	
			
			$layer.find(">dl>dd>ul").empty();
		}
		, setList: function(thisData){
			this.listData = thisData;
			this.display();
		}	
		, display: function(){
			var $layer = this._HTMLDom["$layer"].find(">dl>dd>ul");
			var $element = this._HTMLDom["$element"];
			var $count = this._HTMLDom["$count"];
			var thisClass = this;
			
			$layer.empty();
			
			for(var i=0;i<this.listData.length;++i){
				$layer.append($element.clone(true));	
			}
			
			$count.html("("+ this.listData.length +")");
			 
			$layer.find(">li").each(function(n){
				$(this).find("span:eq(0) img").attr("src",_gf.filePath2Url(thisClass.listData[n]["이미지"])).width(35).height(35);
				$(this).find("span:eq(1)").html(thisClass.listData[n]["닉네임"]);
				if(thisClass.listData[n]["성별"]=="M"){
					$(this).find("ul.info_num li:eq(0)").html("남자").removeClass("sex_w").addClass("sex_m");
				}else{
					$(this).find("ul.info_num li:eq(0)").html("여자").removeClass("sex_m").addClass("sex_w");
				}
				$(this).find("ul.info_num li:eq(1) span").html(thisClass.listData[n]["핸디"]);
				$(this).find("ul.info_num li:eq(2) span").html(thisClass.listData[n]["평타"]);
			});
			
		}
		, $getBtnAssignConfirm: function(){
			return this._HTMLDom["$layer"].find("img[alt=배정확정]");	
		}
		, $getChceckbox: function(){
			return this._HTMLDom["$layer"].find("input:checkbox");	
		}
		, push: function(oneData){
			this.listData.push(oneData);
			this.display();
		}
		, splice: function(n){
			this.listData.splice(n,1);	
			this.display();
		}
	}
	
	//배정확정자 목록
	function clsAssignedUserList(){
		this._HTMLDom = null;
		this.listData = null;
		this.compareData = null;
		this._init();
	}
	
	clsAssignedUserList.prototype = {
		_init: function(){
			var $layer = $("div.pw_area02 div.round div.left:eq(1)");
			this._HTMLDom = {
				"$layer": $layer
				, "$element": $layer.find(">dl>dd>ul>li:first")
				, "$count": $layer.find("dt.group p.fl span")
			}	
			
			$layer.find(">dl>dd>ul").empty();
		}
		, setList: function(thisData){
			this.listData = thisData;			
			this.compareData = _util.objectCopy(thisData);
			this.display();	
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"].find(">dl>dd>ul");
			var $element = this._HTMLDom["$element"];
			var $count = this._HTMLDom["$count"];
			var thisClass = this;
			
			$layer.empty();
			
			for(var i=0;i<this.listData.length;++i){
				$layer.append($element.clone(true));	
			}
			
			$count.html("("+ this.listData.length +")");
			
			$layer.find(">li").each(function(n){
				$(this).find("span:eq(0) img").attr("src",_gf.filePath2Url(thisClass.listData[n]["이미지"])).width(35).height(35);
				$(this).find("span:eq(1)").html(thisClass.listData[n]["닉네임"]);
				if(thisClass.listData[n]["성별"]=="M"){
					$(this).find("ul.info_num li:eq(0)").html("남자").removeClass("sex_w").addClass("sex_m");
				}else{
					$(this).find("ul.info_num li:eq(0)").html("여자").removeClass("sex_m").addClass("sex_w");
				}
				$(this).find("ul.info_num li:eq(1) span").html(thisClass.listData[n]["핸디"]);
				$(this).find("ul.info_num li:eq(2) span").html(thisClass.listData[n]["평타"]);
			});
		}
		, $getBtnAssignCancel: function(){
			return this._HTMLDom["$layer"].find("img[alt=배정취소]");	
		}
		, $getChceckbox: function(){
			return this._HTMLDom["$layer"].find("input:checkbox");	
		}
		, push: function(oneData){
			this.listData.push(oneData);
			this.display();
		}
		, splice: function(n){
			this.listData.splice(n,1);	
			this.display();
		}
	}
	
	function clsComm()
	{
		this.clubInfo = null;
		this.clubInfoRequest = null;
				
		this.clubRoundInfo = null;
		this.clubRoundInfotRequest = null;		
		
		this.clubRoundAssignUserList=null;
		
		this._init();
	}
	
	clsComm.prototype = {
		_init: function(){
			this.clubInfoRequest = {
				"동호회키": null
				, "동호회명": null
			}
			
			this.clubData = {
				"동호회명": null
				, "가입자수": null
				, "라운딩키": null
				, "라운딩제목": null
				, "가입여부": null
				, "가입유형": null
			}
			
			this.clubInfoRequest = {
				 "동호회키":null
				, "라운드키": null
			}
			
			this.clubRoundAssignUsertRequest = {
				 "동호회키":null
				, "라운드키": null
				, "팀키": null				
			}
			 
		}
//------------------------ 동호회기본정보------------------------//		
		, getClubInfo: function(){
			var thisClass = this;
			var club_seq = this.clubInfoRequest["동호회키"];
			
			// ajax 시작			
			//parameter setting and run
			document.objGlobal.ajax({
				"sid":"CL001",
				"servicename":"getClubInfo",
			}, {
				  "clubSeq": club_seq
			}, function(ret){
				
				// callback and mapping
				if(ret["msp"]["contents"]["items"]){					
					var obj = ret["msp"]["contents"]["items"];
					
					thisClass.clubData = {
						"동호회명": _util.nvl(obj["clubName"])
						, "동호회키": _util.nvl(obj["clubSeq"])
						, "배너이미지": _util.nvl(obj["bannerUrl"])
						, "가입자수": _util.nvl(obj["memberCnt"])
						, "글수": _util.nvl(obj["totalBoardCnt"])
						, "개설일": _util.nvl(obj["regDate"])
						, "개설요일": _util.nvl(obj["regDay"])
						, "가입여부": _util.nvl(obj["clubMember"]["memberStatus"])
						, "가입질문": _util.nvl(obj["acceptQuestion"])
						, "가입유형": _util.nvl(obj["acceptYn"])
						, "내상태": _util.nvl(obj["clubMember"]["adminFlag"])
					};					         
				}
				
				$(thisClass).trigger("evtFinishClubInfo");
			});			
			
		}
		, getClubInfoData: function(){
			return this.clubData;
		}
		, setClubInfoRequest: function(key,val){
			this.clubInfoRequest[key] = val;	
		}
		, getClubInfoRequest: function(key){
			return this.clubInfoRequest[key];	
		}
//------------------------ 동호회기본정보------------------------//		
//------------------------ 라운드신청자목록------------------------//		
		, getClubRoundAssignUserList: function(){
			var thisClass = this;
			var szClubSeq = this.clubRoundAssignUsertRequest["동호회키"];
			var szRoundSeq = this.clubRoundAssignUsertRequest["라운드키"]
			var szTeamSeq = this.clubRoundAssignUsertRequest["팀키"]
			
			// ajax 시작			
			//parameter setting and run
			document.objGlobal.ajax({
				"sid":"CL001",
				"servicename":"prepareAssignment",
			}, {
				  "clubSeq": szClubSeq
				  , "roundSeq": szRoundSeq
				  , "teamSeq": szTeamSeq
			}, function(ret){
				// callback and mapping			
				
				if(ret["msp"]["contents"]["items"]){
			
					var obj = ret["msp"]["contents"]["items"];
					var user = [];
					var assigned = [];
					var team = [];
					
					//팀목록
					if(obj["roundTeamInfoList"][0]){
						
						if(!obj["roundTeamInfoList"][0]["items"].length){
							obj["roundTeamInfoList"][0]["items"] = new Array(obj["roundTeamInfoList"][0]["items"]);	
						}	
						
						for(var k=0;k<obj["roundTeamInfoList"][0]["items"].length;++k){							
							team.push({
								"라운드키":_util.nvl(obj["roundTeamInfoList"][0]["items"][k]["roundSeq"])
								, "팀키": _util.nvl(obj["roundTeamInfoList"][0]["items"][k]["teamSeq"])
								, "팀명": _util.nvl(obj["roundTeamInfoList"][0]["items"][k]["teamName"])
								, "배정회원수": _util.nvl(obj["roundTeamInfoList"][0]["items"][k]["assignedMemberCnt"])
							});
						}
					}
					
					//요청대기자
					if(obj["roundRequestUserList"][0]){
						
						if(!obj["roundRequestUserList"][0]["items"].length){
							obj["roundRequestUserList"][0]["items"] = new Array(obj["roundRequestUserList"][0]["items"]);	
						}	
						
						for(var k=0;k<obj["roundRequestUserList"][0]["items"].length;++k){
							//if(obj["roundRequestUserList"][0]["items"][k]["userMaster"]){
								user.push({
									"팀키": null
									, "아이디": _util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["userId"])
									, "이미지": _util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["path"]) + _util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["saveFileName"])
									, "닉네임": _util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["nickname"])
									, "성별": _util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["sex"])
									, "핸디":_util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["handi"])
									, "평타": _util.nvl(obj["roundRequestUserList"][0]["items"][k]["userMaster"]["average"])
								});
							//}
						}
					}
					
					//라운드확정자
					if(obj["roundTeamInfo"]){
						
						for(var i=1;i<=4;++i){
							var str = "assignedUser" + i + "Info";
							
							if(obj["roundTeamInfo"][str]){						
								assigned.push({
									"팀키": _util.nvl(obj["roundTeamInfo"]["teamSeq"])
									, "아이디": _util.nvl(obj["roundTeamInfo"][str]["userId"])
									, "이미지": _util.nvl(obj["roundTeamInfo"][str]["path"]) + _util.nvl(obj["roundTeamInfo"][str]["saveFileName"])
									, "닉네임": _util.nvl(obj["roundTeamInfo"][str]["nickname"])
									, "성별": _util.nvl(obj["roundTeamInfo"][str]["sex"])
									, "핸디":_util.nvl(obj["roundTeamInfo"][str]["handi"])
									, "평타": _util.nvl(obj["roundTeamInfo"][str]["average"])
								});
							}		
						}
					}
					
						
					//동호회목록
					thisClass.clubRoundAssignUserList = {
						"동호회키": _util.nvl(obj["clubSeq"])
						, "라운드키": _util.nvl(obj["roundSeq"])
						, "신청자": user
						, "배정자": assigned
						, "팀목록": team					
					};		
				}
				$(thisClass).trigger("evtFinishClubRoundAssignUserList");
			});		
		}
		, getClubRoundAssignUserData: function(){		
			return this.clubRoundAssignUserList;
		}
		, setClubRoundAssignUserListRequest: function(key, val){
			this.clubRoundAssignUsertRequest[key] = val;
		}
		, getClubRoundAssignUserListRequest: function(key){
			return this.clubRoundAssignUsertRequest[key];
		}	
//------------------------ 라운드신청자목록------------------------//	
//------------------------ 라운드배정하기------------------------//	
		, InsertAssign: function(arg){			
			var thisClass = this;
					
			var szClubSeq = arg["동호회키"];
			var szRoundSeq = arg["라운드키"];
			var szTeamSeq = arg["저장팀키"];
			var szUser1 = arg["용자1"]
			var szUser2 = arg["용자2"]
			var szUser3 = arg["용자3"]
			var szUser4 = arg["용자4"]
					
			// ajax 시작			
			//parameter setting and run
			document.objGlobal.ajax({
				"sid":"CL001",
				"servicename": "assignUser"
			}, {
				"clubSeq": szClubSeq
				, "roundSeq": szRoundSeq
				, "teamSeq": szTeamSeq
				, "assignedUser1": szUser1
				, "assignedUser2": szUser2
				, "assignedUser3": szUser3
				, "assignedUser4": szUser4
			}, function(ret){				
				// callback and mapping
				var resData = {
					"응답코드": (ret["msp"]["contents"]["serviceResult"] == "00000"?true:false)
					, "메세지": _gf.getResultMsg(ret)
					, "조회팀키": arg["조회팀키"]
				}
				
				$(thisClass).trigger("evtFinishClubRoundAssignSubmit", [resData]);
				
			});
			// ajax 끝
		}
//------------------------ 라운드배정하기------------------------//	

	}
	
	function clsControl()
	{
		this.objComm = null;
		
		this.objClubInfo = null
		
		this.objRequestUserList= null;
		this.obTeamList = null;
		this.objAssignedUserList=null;
		
		this.club_seq = null;
		this.club_my = null;
		this.round_seq = null;		
		this.team_seq = null;
	
	}
	
	clsControl.prototype = {
		_init: function(){
			var member_id = document.objUtil.getCookie("member_id");
			this.club_seq = document.objUtil.getParam("club_seq");
			this.club_my = (document.objUtil.getParam("club_my") == "Y") ? 1:0;
			this.round_seq = document.objUtil.getParam("round_seq");
			this.team_seq = _util.nvl(document.objUtil.getParam("team_seq"),1);
			
			if(!this.club_seq) document.location.href = "../club/club.html";
			
			if(!member_id) {
				if(confirm("로그인 후 이용하여 주세요.")){
					document.objGlobal.goLogin();						
				}else{
					document.location.href = "../club/club.html";
				}				
			}else if(!this.club_seq) {
				document.location.href = "../club/club.html";
			}
			
			this.objComm = new clsComm();
			
			this.objClubInfo = new clsClubInfo();			
			
			this.objRequestUserList = new clsRequestUserList();
			this.objAssignedUserList = new clsAssignedUserList();
			this.objTeamList = new clsTeamList();
			
			this._bind();
			
			//동호회정보
			this.objComm.setClubInfoRequest("동호회키",this.club_seq); 
			this.objComm.getClubInfo();
			
		}
		, _bind: function(){
			var thisClass = this;
						
			// 동호회정보 조회 완료이벤트
			$(this.objComm).bind("evtFinishClubInfo", function(){
				var thisData = thisClass.objComm.getClubInfoData();				
				thisClass.objClubInfo.setData(thisData);
				
				//신청자목록
				thisClass.objComm.setClubRoundAssignUserListRequest("동호회키", thisClass.club_seq);
				thisClass.objComm.setClubRoundAssignUserListRequest("라운드키", thisClass.round_seq);
				thisClass.objComm.setClubRoundAssignUserListRequest("팀키", thisClass.team_seq);
				thisClass.objComm.getClubRoundAssignUserList();
			});
			
			//배정목록 조회 완료 이벤트(신청자,배정자,팀목록)
			$(this.objComm).bind("evtFinishClubRoundAssignUserList",function(event){
				var thisData= thisClass.objComm.getClubRoundAssignUserData();
				
				thisClass.objRequestUserList.setList(thisData["신청자"]);
				thisClass.objAssignedUserList.setList(thisData["배정자"]);
				thisClass.objTeamList.setList(thisData["팀목록"]);
				thisClass.objTeamList.setValue(thisClass.team_seq);				
			});
			
			//배정하기 완료 이벤트
			$(this.objComm).bind("evtFinishClubRoundAssignSubmit",function(event, resData){
				alert(resData["메세지"]);		
				if(resData["응답코드"]){			
					thisClass.objComm.setClubRoundAssignUserListRequest("팀키", resData["조회팀키"]);	
					thisClass.objComm.getClubRoundAssignUserList();
				}
			});
			
			//배정확정(->) 버튼 이벤트
			thisClass.objRequestUserList.$getBtnAssignConfirm().click(function(event){
				 
				 var $checkbox = thisClass.objRequestUserList.$getChceckbox();
				 var $checked = thisClass.objRequestUserList.$getChceckbox().filter(":checked");
				 
				 var assignCnt = thisClass.objAssignedUserList.listData.length;
				 
				 if($checked.length+thisClass.objAssignedUserList.listData.length>4) {
				 	alert("선택된 인원이 최대인원(4명)이 초과되는 범위입니다. 다시 확인하십시요.");	
				 	return;
				}
				 
				 //반복문으로 인해 인덱스번호가 안맞는 경우가 있어 반대로 돌린다.
				 for(var i=$checked.length-1;i>=0;--i){
				 	var idx = $checkbox.index($checked[i]);
				 	thisClass.objAssignedUserList.push(thisClass.objRequestUserList.listData[idx]);
				 	thisClass.objRequestUserList.splice(idx);
				}
			});
			
			//배정취소(<-) 버튼 이벤트
			thisClass.objAssignedUserList.$getBtnAssignCancel().click(function(event){
				
				var $checkbox = thisClass.objAssignedUserList.$getChceckbox();
				var $checked = thisClass.objAssignedUserList.$getChceckbox().filter(":checked");
				 
				 //반복문으로 인해 인덱스번호가 안맞는 경우가 있어 반대로 돌린다.
				 for(var i=$checked.length-1;i>=0;--i){
				 	var idx = $checkbox.index($checked[i]);
				 	thisClass.objRequestUserList.push(thisClass.objAssignedUserList.listData[idx]);
				 	thisClass.objAssignedUserList.splice(idx);
				}
			});
			
			//팀(셀렉트박스) 변경 이벤트
			$(this.objTeamList).bind("selectChange",function(event){
				var tmp = thisClass.team_seq;
				thisClass.team_seq = thisClass.objTeamList.getValue();
				
				if(thisClass.isCompare()) {
					thisClass.objComm.setClubRoundAssignUserListRequest("팀키", thisClass.team_seq);
					thisClass.objComm.getClubRoundAssignUserList();
				}else {
					if(confirm("변경된 정보를 저장하시겠습니까?")){				
						var submitData = thisClass.getSumbitData();
						submitData["저장팀키"] = tmp;
						thisClass.objComm.InsertAssign(submitData);
					}else {
						thisClass.objComm.setClubRoundAssignUserListRequest("팀키", thisClass.team_seq);
						thisClass.objComm.getClubRoundAssignUserList();
					}
				}
				
			});
			
			//확인버튼
			$("p.pop_bt a img[alt=확인]").click(function(event){
				
				if(thisClass.isCompare()) {
					alert("변경된 정보가 없습니다.");	
					return;
				}
				var submitData = thisClass.getSumbitData();
				thisClass.objComm.InsertAssign(submitData);
			});
			
			//취소버튼
			$("p.pop_bt a img[alt=취소]").click(function(event){				
				opener.document.objControl.parentReload();
				self.close();
			});
			
			//닫기버튼
			$("p.pop_close").click(function(event){
				opener.document.objControl.parentReload();
				self.close();
			});
		}
		//변경된 데이터 확인
		, isCompare: function(){
			var compareData = this.objAssignedUserList.compareData;
			var listData= this.objAssignedUserList.listData;			
			if(compareData.length != listData.length) {
				return false;				
			}else {
				for(var i=0;i<compareData.length;++i){
					var bool = false;					
					for(var k=0;k<listData.length;++k){
						if(compareData[i]["아이디"]==listData[k]["아이디"]) bool = true;	
					}					
					if(!bool) return false;
				}
			}
			return true;
		}
		//저장데이터 생성
		, getSumbitData: function(){
			var szUser1 = null;
			var szUser2 = null;
			var szUser3 = null; 
			var szUser4 = null;
			
			switch(this.objAssignedUserList.listData.length){
				case 4 : 	szUser4 = this.objAssignedUserList.listData[3]["아이디"];
				case 3 : 	szUser3 = this.objAssignedUserList.listData[2]["아이디"];
				case 2 : 	szUser2 = this.objAssignedUserList.listData[1]["아이디"];
				case 1 : 	szUser1 = this.objAssignedUserList.listData[0]["아이디"];
			}
			
			var submitData = {
					"동호회키": this.club_seq
					, "라운드키": this.round_seq
					, "저장팀키": this.team_seq
					, "조회팀키": this.team_seq
					, "용자1": szUser1
					, "용자2": szUser2
					, "용자3": szUser3
					, "용자4": szUser4
			}
			return submitData;
		}
	}
	
	document.objControl = new clsControl();
	document.objControl._init();
});